<%@ page language="java" pageEncoding="UTF-8"%>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="true">
  <head>
    <title>编辑商品信息</title>
    <base href="<%=basePath%>">
	<link rel="stylesheet" type="text/css" href="css/styles.css" >
      <script type="text/javascript" src="javascript/user.js" charset="gb2312"></script>
  	  <script type="text/javascript" src="javascript/date.js" charset="gb2312"></script>
  </head>

  <body class="main">
  <form action="allGood!doEdit.action" method="post" name="editform">
     <span style="font-weight:bold;">编辑商品信息</span>
  		
  		<div class="button_bar">
		<input type="button" class="common_button" onclick="javascript:history.go(-1)" value="返回"/>
		<input type="submit" class="common_button"  value="保存"/>
	
		<table class="query_form_table" border="0" cellPadding="3" cellSpacing="0">
			<tr>
				<th class="input_title">商品名称</th>
				<td class="input_content">
					<input type="hidden" value="${requestScope.good.goodId}" name="good.goodId"/>
					<input type="text" value="${requestScope.good.goodName}" name="good.goodName" readonly="readonly" style="background-color:#dadada"/>&nbsp;
				</td>
				<th class="input_title">商品特价</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.goodPrice}" name="good.goodPrice" maxlength="30"/>	
				</td>
			</tr>
			<tr>
				<th class="input_title">商品原价</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.goodOldprice}" name="good.goodOldprice" readonly="readonly" style="background-color:#dadada"/>	
				</td>
				<th class="input_title">商品折扣</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.goodDiscount}" name="good.goodDiscount" maxlength="30"/>	
				</td>
			</tr>
			<tr>
				<th class="input_title">节省价钱</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.goodSave}" name="good.goodSave" maxlength="30"/>	
				</td>
				<th class="input_title">商品开始出售时间</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.startTime}" name="good.startTime" onfocus="CreateMonthView(this)" onblur="DeleteMonthView(this)"/>	
				</td>
			</tr>
			<tr>
				<th class="input_title">商品结束出售时间</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.endTime}" name="good.endTime" onfocus="CreateMonthView(this)" onblur="DeleteMonthView(this)"/>	
				</td>
				<th class="input_title">商品内容</th>
				<td class="input_content">
					good.goodInfo 	
				</td>
			</tr>
			<tr>
				<th class="input_title">商品种类</th>
				<td class="input_content">
					<input type="text" value="${requestScope.good.goodkind}" name="good.goodkind" readonly="readonly" style="background-color:#dadada"/>	
				</td>
				<th class="input_title">商品图片</th>
				<td class="input_content">
					<input type="file" value="${requestScope.good.goodUrl}" name="good.goodUrl"/>	
				</td>
			</tr>
		</table>
	
</div>
</form>	
  </body>
</html>
<c:if test="${param.message == '1'}" >
<script>
alert("修改成功");
</script>
</c:if>
<c:if test="${param.message == '0'}" >
<script>
alert("修改失败");
</script>
</c:if>